<template>
	<div class="orderpjxq">
		<div class="orderpjxq-content">
			<ul class="orderpjxq-title">
				<li class="orderpjxq-user-photo"><img :src="(pjxinxi.user_portrait.indexOf('http:/')==-1?'http://www.ntyouxuan.com/'+pjxinxi.user_portrait:pjxinxi.user_portrait)"/></li>
				<li class="orderpjxq-user-xinxi">
					<p v-text="pjxinxi.user_name"></p>
					<span v-text="pjxinxi.evaluation_time">2018-12-12</span>
				</li>
				<li class="orderpjxq-user-pj">
					<span v-if="pjxinxi.evaluation==3"><img src="../../img-order/haoping_btn@3x.png"/></span>
					<span v-if="pjxinxi.evaluation==3">好评</span>
					<span v-if="pjxinxi.evaluation==2"><img src="../../img-order/zhongping_btn@3x.png"/></span>
					<span v-if="pjxinxi.evaluation==2">中评</span>
					<span v-if="pjxinxi.evaluation==1"><img src="../../img-order/chaping_btn@3x.png"/></span>
					<span v-if="pjxinxi.evaluation==1">差评</span>
				</li>
			</ul>
			<div class="orderpjxq-zitu">
				<p v-text="pjxinxi.comment">评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容</p>
				<div class="orderpjxq-photo" v-if="pjxinxi.evaluation_image">
					<span v-for="item in evaluation_image"><img :src="'http://www.ntyouxuan.com/'+item"/></span>
				</div>
			</div>
		</div>
		<div class="shopcard-listBox">
			<ul class="shopcard-list-item-box">
				<li class="shopcard-list-item" @click="shopxq()">
					<div>
						<router-link :to="{path:'/shopXQ/'+pjxinxi.goods_id}">
							<img :src="'http://www.ntyouxuan.com/'+pjxinxi.goods_image"/>
							<div class="shopcard-list-item-xinxi">
								<h3 v-text="pjxinxi.goods_name"></h3>
								<p><span v-text="pjxinxi.specification">白色；10斤装</span></p>
								<div class="shopcard-item-num">
									<span>￥</span>
									<span v-text="price_detail[0]+'.'"></span>
									<span v-text="price_detail[1]"></span>
									<p class="shopDd-itemnum" v-text="'x'+pjxinxi.quantity">x1</p>
								</div>
							</div>							
						</router-link>
					</div>	
				</li>	
			</ul>
		</div>
	</div>
</template>

<script>
	import orderpjxqCss from '@/css/orderpjxq.css'
	
	export default{
		name:'orderpjxq',
		data () {
			return{
				user:0,
				pjxqid:0,
				pjxinxi:'',
				price_detail:['0','00'],
				evaluation_image:''
			}
		},
		created:function(){
			this.user=localStorage.getItem("nt_user");
			this.pjxqid=this.$route.query.orderpjxqid;
		},
		methods:{
			shopxq:function(){
				this.$router.push({path:'/shopXQ/'+this.pjxinxi.goods_id});
			}
		},
		mounted:function(){
			var self=this;
			$.ajax({
				type:"post",
				url:furl+"index.php?app=ajax_buyer_order&act=evaluate_view",
				data:{'token':self.user,'rec_id':self.pjxqid},
				dataType:'json',
				success:function(res){
					if(res.done){
						res.retval.evaluation_time=new Date(Number(res.retval.evaluation_time)*1000).Format('yyyy-MM-dd hh:mm:ss');
						self.price_detail=res.retval.price_detail;
						self.pjxinxi=res.retval;
						self.evaluation_image=res.retval.evaluation_image;
					}
				}
			});
		}
	}
</script>

<style>
</style>